﻿<!--#include File="Config/Config.asp"-->
<!--#include File="Include/Class_Function.asp"-->
<!--#include File="Include/Class_FrontPage.asp"-->
<%
ID	=	trim(request.QueryString("ID"))
newid=id
if not IsNumeric(id) then
	response.Write("传递参数出错！")
	response.End()
end if
'------------------------------------------------------------------------------
conn.execute("update NewsInfo set NewsClick=NewsClick+1 where id="&id)
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql = "Select ClassID,NewsAuthor,NewsTitle,NewsBPic,NewsContent,PostTime,NewsClick,Keywords From NewsInfo Where NewsLock=0 and ID="&ID&""
Rs.Open Sql,Conn,1,1
If Not (Rs.Eof Or Rs.Bof ) Then
	ClassID		=	rs("ClassID")
	NewsAuthor=	rs("NewsAuthor")
	NewsTitle	=	trim(rs("NewsTitle"))
	NewsContent	=	rs("NewsContent")
	PostTime	=	rs("PostTime")
	NewsClick	=	rs("NewsClick")
	NewsBPic	=	rs("NewsBPic")
	Keywords	=	nonull(rs("Keywords"))
End If
Rs.Close
set rs = nothing
'-----------------------------------------------------------------------------

title	=	NewsTitle	'页面title
call showhead()		'-----显示头部导航
%>
  <div id="content">
    <div class="left">
		<%call newlistleft()%>
    </div>
    <div class="right">
      <div class="indexcontent">
        <div class="about">
          <div class="linetitle"><%=GetSubNavName("NewsClass",ClassID)%></div>
          <div class="contacts">
          	<div class="title">
            	<h1><%=Title%></h1>
              作者：<%=NewsAuthor%>&nbsp;&nbsp;&nbsp;&nbsp;浏览次数：<%=NewsClick%>&nbsp;&nbsp;&nbsp;&nbsp;发布时间：<%=PostTime%>
            </div>
<div style="text-align:center">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2143034021767424";
/* expo源码 */
google_ad_slot = "0950731218";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
            <%if NewsBPic<>"" then%>
            <img src="<%=NewsBPic%>" border="0" class="img_content" align="middle"/>
            <%end if%>
            <%=NewsContent%>
            <br>
            <script type="text/javascript"><!--
google_ad_client = "ca-pub-2143034021767424";
/* expocms */
google_ad_slot = "6958295420";
google_ad_width = 680;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
            <%call getnextpre("NewsInfo",newid)%>
          </div>
        </div>
<%
'Keywords="asp|iis|xp|"
likeSql=""
KeywordsArry=Split(Keywords,"|")
For ArryI=0 To Ubound(KeywordsArry)
	KeyTempStr = nonull(KeywordsArry(ArryI))
	if KeyTempStr<>"" then
		likeSql= likeSql &" or Keywords like '%"&KeyTempStr&"%' "
	end if
next
if likeSql<>"" then
	likeSql	=	" and ("&mid(likeSql,4)&")"
end if
	sqlstr	=	"select top 5 id,NewsTitle from newsinfo where NewsLock=0 "&likeSql&" order by NewsClick desc"
	'response.Write(sqlstr)
	set rs=server.CreateObject("adodb.recordset")
	rs.open sqlstr,conn,0,1
	if not rs.eof then
%>
    <div class="linetitle">相关文章</div>
    <div class="contacts">
    <ul>
<%
		do until rs.eof
		id				=	rs("id")
		NewsTitle	=	rs("NewsTitle")
		subNewsTitle	=	CutStr(NewsTitle,30)
%> 
    <li><a href="news.asp?id=<%=id%>" target="_blank"><%=subNewsTitle%></a></li>
<%
		rs.movenext
		loop
%>		     
    </ul>       
    </div>
<%
	end if
	rs.close
	set rs = nothing
%>        
        <div class="clear"></div>
      </div>
    </div>
  </div>
<%
'------显示页面尾部--
call showfoot()
%>